-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$VIMRUNTIME is already defined in vim #125
base: master
Are you sure you want to change the base?
Conversation
The documented method to look up the compiled-in default of $VIMRUNTIME does't work in cloud-init runcmd.
cloud-init-output.log:
|
Hi @wenzhuoz , As outlined in the documentation regarding default of $VIMRUNTIME i.e. method to look up the compiled-in default of $VIMRUNTIME, This may not be applicable in the context of cloud-init. To address this issue, we can either assign the value to a different variable or verify if the VIMRUNTIME variable is uninitialized. If it is, we can define it and assign the appropriate value; otherwise, we can proceed to use the VIMRUNTIME variable as you have recommended. Best Regards, |
Hi @push143smart , Vimrc is interpreted by vim itself and it has a compiled-in default of $VIMRUNTIME, so we don't have to look it up in a script, unless you intend to use a different $VIMRUNTIME folder. Wenzhuo |
Actually, it's a bad idea to put an absolute path in vimrc, because in a future release upgrade, vim might be upgraded to version 9.1 and the default VIMRUNTIME folder would change to /use/share/vim/vim91, and you'll have to modify vimrc again. |
Hi all. Just to add my feedback on this issue. I really don't see the point of changing As an example, in my private fork of this script, I simply removed this let g:skip_defaults_vim = 1
syntax on
set background=dark
set modeline
set modelines=3
set mouse= But, once again, I don't think it should be the job of this script to do such kind of initialization... |
Totally agreed. But if you must do it, just use the variable name $VIMRUNTIME in vimrc instead of the current vim compiled-in default value of it. |
While on the issue of what should be on the script or not, another thing that, in my opinion, should not be on the script, is the |
Hi @JoseGoncalves I agreed that ideally script should not have dev tools configuration but as this is a basic configuration for editor which just help us to debug better directly on the system we kept in the script. Otherwise we have to manage other utility to install/configure the system to make debugging easy. We will evaluate this if we see requirement to add more such stuff. |
Hi @kguptasangoma. One idea, would be to add those dev tools installation & config only if the |
this is just a basic vim setting , if we come up any more advanced stuff for dev then we could add under dev flag. |
Vim error message in a freshly installed freepbx 17 system:
Because $VIMRUNTIME is already defined in vim, we don't have to take the trouble to expand it to its actual filesystem path in vimrc.